1. Field of the Invention
This invention relates to generating name spaces in a graphical user interface, and more specifically, to generating name spaces for a Web page definition.
2. Background Art
Computers and computer networks are used to exchange information in many fields such as media, commerce, and telecommunications, for example. Media information may include movies, video, audio CD's, radio, newspapers, books, magazines, and computer games. Commerce information includes electronic banking and bill payment, as well as electronic purchases. Voice telephone transmissions and video conferencing are examples of telecommunication information. The exchange of information between computers typically occurs between a “server application” that provides information or services, and a “client application” that receives the provided information and services. A client application executes on a client computer or client. A server application is executed on a server computer or server.
Client applications are able to communicate with server applications executing on the same computer system or on another computer system.
Client applications are able to communicate with server applications executing on the same computer system or on another computer system accessible via a network. Computers can be interconnected via a local area network (LAN), a wide area network (WAN) and/or the Internet, for example. The Internet is an example of a world wide communications network comprised of various physical networks that interconnect a client computer with a server. The Internet offers a distributed environment wherein a client having access to the Internet can request information from a server that has access to the Internet regardless of the location of either the client or the server.
Before the advent of the Internet, users accessed server applications via a LAN or WAN, for example. The server was either a mainframe, minicomputer or other computer system. A user typically used either a terminal or a personal computer to display the information in a graphical user interface.
With the advent of the Internet, users of client systems are able to access server applications no matter how remotely the two are located as long as the client and server systems have access to the Internet. This has resulted in a desire to develop a computing architecture wherein a client can access a server application via the Internet. A client application referred to as a browser has been developed to generate a graphical user interface (“GUI”) screen (or page) of information using a page definition received from a server.
If a server application is able to generate page definitions that can be read by the browser to generate and display a GUI screen, the Internet can be used to send application data to the user. Further, if a server application can receive data input by a user into a GUI screen and sent by the browser, the Internet can be used to send application data to the server application that can process the data. Thus, it is beneficial to provide tools for the generation of page definitions and process of input data.
A page definition can comprise only text. Alternatively, program logic written in a scripting language can be incorporated into a page's definition. Further, a page definition can reference small programs referred to as applets that can be transmitted to the client for execution via the Internet. Thus, both data and programs can be transmitted to the client from a server.
When a client requests a page definition from the server, the server responds by sending the page definition to the client application. A page definition can be static or dynamic. Static page definitions can be used where, for example, there is no need to modify the definition at runtime. In an interactive application, however, one screen display is dependent on input received from the user in a previous screen. Thus, there is a need when “porting” interactive applications to the Internet to be able to generate dynamic page definitions.
One problem with generating dynamic page definitions has to do with the manner in which data is transmitted in the page definition. Data is transmitted in name-value pairs. The “name” portion of the name-value pair identifies a name for a value or piece of data. The following is an example of a name value pair:                response=yes        
The “name” portion (e.g., “response”) typically specifies a variable in server-side program code (e.g., gateway program) that is used to process the value (e.g., “yes”) in the name-value pair.
It may be desirable to use multiple program modules or instances of object-oriented objects, for example, to generate a page definition. It is possible that the different program modules used to generate a page definition may use the same name for different data. Thus, it is possible that a naming conflict can occur when generating a page definition thereby making it impossible to, for example, determine how to process the data.
The problems associated with generating a page definition can be better understood from a discussion of concepts associated with the Internet.
Internet Concepts
The Internet is comprised of many physical networks. For example, a client computer in a user's home can be connected via one or more networks that comprise the Internet to a server regardless of either's location to gain access to information that is resident on the server. A client's request can be transported via the Internet's networks to the server. A response from the server can be transmitted to the user via the Internet.
The Transport Control Protocol/Internet Protocol (TCP/IP) is the basic communications protocol for transmitting information over Internet. A communications protocol typically defines the format for a packet, or bundle, of data that is to be transmitted. A packet usually includes control information (e.g., destination, origin, packet length, etc.), the data to be transmitted and error detection and correction. Other communications protocols, such as Hypertext Transmission Protocol (HTTP) and File Transfer Protocol (FTP), are built on top of TCP/IP. Resources (e.g., servers, services, program code, and files) are accessible via the Internet and are typically referenced by a universal resource locator (URL) that identifies the resource, the location of the resource and the protocol used to obtain the resource. A URL is a mechanism by which a resource can be identified in a request. HTTP and FTP are mechanisms by which the request is communicated.
One example of a resource that can be requested by specifying a URL is a Hypertext Markup Language (HTML) document that defines a page of graphic content including graphic user interface (GUI) elements. HTML is a structural language that is comprised of HTML elements that are nested within each other.
HTML statements are typically grouped in a text file or document. The HTML statements include certain strings of characters, called tags, that mark regions of the document and assign special meaning to them. These regions are called HTML elements. Each element has a name, or tag. An element can have attributes that specify properties of the element. Blocks or components include unordered list, text boxes, check boxes, radio buttons, for example. Each block has properties such as name, type, and value. The following provides an example of the structure of an HTML document:
<HTML><HEAD>.... element(s) valid in the document head</HEAD><BODY>.... element(s) valid in the document body</BODY></HTML>
Each HTML element is delimited by the pair of characters “<” and “>”. The name of the HTML element is contained within the delimiting characters. The combination of the name and delimiting characters is referred to as a marker, or tag. Each element is identified by its marker. In most cases, each element has a start and ending marker that form an HTML block. The ending marker is identified by the inclusion of an another character, “/” that follows the “<” character.
HTML is a hierarchical language. With the exception of the HTML element, all other elements are contained within another element's block. The HTML element encompasses the entire document. It identifies the enclosed text as an HTML document. The HEAD element is contained within the HTML element and includes information about the HTML document. The BODY element is contained within the HTML. The BODY element contains all of the text and other information to be displayed. Other HTML elements are described in an HTML reference manual.
An HTML document is transmitted via the HTTP communications protocol to a client that is running a software package referred to as a browser. A browser provides a GUI to display a page of information that is defined using HTML. The browser parses the HTML statements to generate and display the page's GUI elements in the browser's display area. The browser further provides a mechanism for the user to input information and/or to submit a request which the browser forwards, via the Internet, to the appropriate Internet server using a communications protocol such as HTTP.
Name-Value Pairs
An HTML element definition can include attributes, or properties, associated with data that identify its name (e.g., via a name attribute) and its value (e.g., via a value attribute). For example, in an input element such as a text box, a value attribute can specify an initial value to be placed in the text box. The name attribute can also be used as a label for the contents of the text box when it is returned to the server. The mechanism that is typically used to return data to the server is referred to as a name-value pair. FIG. 1 provides an example of the transfer of data between a client and server using name-value pairs.
Server 130 includes HTTP server 132, common gateway interface (“CGI”) 134 and gateway program 136. Server 130 is connected to a client browser 120 via Internet 128. Browser 120 displays a GUI page 126 that includes GUI elements 102 and 104 that can be used, for example, to display and input text. Elements 102 and 104 can be generated from a page definition containing HTML statements, for example.
Segment 106 is a segment of the page definition that contains attribute segments 112 and 114. Attribute segments 112 and 114 contain name and value attributes that can be used to initially populate elements 102 and 104, respectively. The name attributes in attribute segments 112 and 114 associate names (i.e., “fname” and “lname”) with values (i.e., “Joseph” and “Smith”).
Gateway program 136 is typically written in a scripting language and can be used to output attribute segments 112 and 114. Attribute segments 112 and 114 are transmitted to HTTP server 132 and transmitted via the Internet to client browser 120.
Upon receipt, client browser 120 parses the page definition containing attribute segments 112 and 114 and displays the associated values (e.g., “Joseph” and “Smith”) in elements 102 and 104 of display 126. The user can update the values contained in elements 102 and 104 and submit the updates to client browser 120. Client browser 120 sends the values contained in GUI elements 102 and 104 to server 130 via Internet 128. For example, client browser 120 can generate a POST request, for example, that includes request segment 108 that contains name-value pairs 122 and 124 in the form of the variable name specified in the “name” attribute, followed by an equals sign (“=”) followed by the value (e.g., name-value pairs 122 and 124).
The POST request identifies gateway program 136 (using, for example, a universal resource locator or “URL”). When the request is received by HTTP server 132, the data (e.g., name-value pairs 122 and 124) that is contained in the request is sent to gateway program 136 using Common Gateway Interface (“CGI”) 134. Gateway program 136 uses the variable name portion of name-value pairs 122 and 124 to identify the data. Gateway program 136 can, for example, include variables that correspond to the names in name-value pairs 122 and 124. The value portion in name-value pairs 122 and 124 can be assigned to these variables in gateway program 136 and/or gateway program 136 can process the data returned from browser 120.
In this example, there is only one program (e.g., gateway program 136) that is generating segment 106. However, it may be that multiple programs or program code are used to generate segment 106. It is further possible that the programs or program code that is/are used to generate segment 106 may assign the same name to a name attribute. Thus, it is possible that a naming conflict can occur where the same name is used for two or more different values.
Internet Browser and Page Definitions
In addition to name conflicts, problems arise due to the different types of browsers available for use by clients. Browsers are available from various sources. Microsoft's Internet Explorer and Netscape's Navigator and Communicator are examples of browsers. A client can run one of these or another browser to interpret the HTML statements that define a page. Browsers do not interpret HTML statements in a uniform manner. For example, one browser may be able to process a particular HTML statement while another browser may not be able to interpret the HTML statement, or may interpret it differently.
To accommodate the various browsers, a page developer (i.e., a developer of a page definition) creates different definitions that contain different HTML. Where a page definition is created at runtime, the developer must write code to test for the browser type and then generate HTML for the particular browser type. For example, a developer must write conditional code to test for the browser type and output statements to write the HTML to a page definition file (i.e., a Web page definition) that can be processed by a particular browser type.
Page definitions that are used by a browser to generate a display may contain a portion that is common to more than one definition. For example, multiple page definitions may use the same header portions. Each page definition that contains the common portion must be modified to modify the common portion. It would be beneficial to be able make the modification(s) to a common portion once and have the modification(s) propagate to each page definition that uses the common portion.